With rapid growth of computing capabilities of servers in a communications system, an increasing quantity of network services (such as a firewall service) need to be urgently migrated from conventional dedicated device platforms to servers. Currently, as a main trend of development of a next generation communication network, a network virtualization technology gradually implements various network service functions by using three types of general devices: a server, a switch, and a storage device. A network service function is implemented in the foregoing manner, which can implement flexible and convenient deployment of services and reduce development costs.
To meet flexible and convenient deployment of services, a virtualization technology is generally used on a server. Currently, a virtual machine manager (hypervisor software) runs on the server to virtualize one physical server into multiple servers, so that multiple different pieces of network service processing software that do not affect each other are conveniently deployed on a same server.
However, a solution to implementing network service processing in the prior art has the following disadvantages: After a server uses hypervisor software, upon receiving a packet, a network interface card of the server needs to transmit the packet to a virtual switch (vswitch) by using the hypervisor software; a processor in the server identifies the packet in the vswitch, and the vswitch distributes the packet, so as to correctly deliver the packet to a different virtual machine (VM); and upon receiving the packet, the VM performs service processing on the packet. However, when there are a relatively large quantity of packets, the vswitch can deliver the packets to correct VMs only after the processor identifies each received packet, which greatly increases workload of the processor, and reduces distribution efficiency in processing a packet by the processor. In addition, it also shows that efficiency in processing a packet by the processor is greatly decreased compared with that before virtualization.